// 建一个3000或者3001的代理服务器
const http = require('http');
const url = require('url');

http.createServer((req, res) => {
    const {pathname} = url.parse(req.url, true);
    if(pathname === '/api') {
        res.end('proxy 3001')
    }
    
}).listen(3001, () => {
    console.log('proxy 3001 is running');
});